home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsIConverterOutputStream.idl < prev    next >
Text File  |  2006-05-08  |  3KB  |  77 lines

  1. /* vim:set expandtab ts=4 sw=4 sts=4 cin: */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Mozilla Public License Version
  6.  * 1.1 (the "License"); you may not use this file except in compliance with
  7.  * the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/MPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is mozilla.org unicode stream converter code.
  16.  *
  17.  * The Initial Developer of the Original Code is
  18.  * Christian Biesinger <cbiesinger@web.de>.
  19.  * Portions created by the Initial Developer are Copyright (C) 2005
  20.  * the Initial Developer. All Rights Reserved.
  21.  *
  22.  * Contributor(s):
  23.  *
  24.  * Alternatively, the contents of this file may be used under the terms of
  25.  * either the GNU General Public License Version 2 or later (the "GPL"), or
  26.  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  27.  * in which case the provisions of the GPL or the LGPL are applicable instead
  28.  * of those above. If you wish to allow use of your version of this file only
  29.  * under the terms of either the GPL or the LGPL, and not to allow others to
  30.  * use your version of this file under the terms of the MPL, indicate your
  31.  * decision by deleting the provisions above and replace them with the notice
  32.  * and other provisions required by the GPL or the LGPL. If you do not delete
  33.  * the provisions above, a recipient may use your version of this file under
  34.  * the terms of any one of the MPL, the GPL or the LGPL.
  35.  *
  36.  * ***** END LICENSE BLOCK ***** */
  37.  
  38. #include "nsIUnicharOutputStream.idl"
  39.  
  40. interface nsIOutputStream;
  41.  
  42. /**
  43.  * This interface allows writing strings to a stream, doing automatic
  44.  * character encoding conversion.
  45.  */
  46. [scriptable, uuid(4b71113a-cb0d-479f-8ed5-01daeba2e8d4)]
  47. interface nsIConverterOutputStream : nsIUnicharOutputStream
  48. {
  49.     /**
  50.      * Initialize this stream. Must be called before any other method on this
  51.      * interface, or you will crash. The output stream passed to this method
  52.      * must not be null, or you will crash.
  53.      *
  54.      * @param aOutStream
  55.      *        The underlying output stream to which the converted strings will
  56.      *        be written.
  57.      * @param aCharset
  58.      *        The character set to use for encoding the characters. A null
  59.      *        charset will be interpreted as UTF-8.
  60.      * @param aBufferSize
  61.      *        How many bytes to buffer. A value of 0 means that no bytes will be
  62.      *        buffered. Implementations not supporting buffering may ignore
  63.      *        this parameter.
  64.      * @param aReplacementCharacter
  65.      *        The replacement character to use when an unsupported character is found.
  66.      *        The character must be encodable in the selected character
  67.      *        encoding; otherwise, attempts to write an unsupported character
  68.      *        will throw NS_ERROR_LOSS_OF_SIGNIFICANT_DATA.
  69.      *
  70.      *        A value of 0x0000 will cause an exception to be thrown upon
  71.      *        attempts to write unsupported characters.
  72.      */
  73.     void init(in nsIOutputStream aOutStream, in string aCharset,
  74.               in unsigned long aBufferSize,
  75.               in PRUnichar aReplacementCharacter);
  76. };
  77.